import {
	service
} from "../http";

export const find = {
	index: {
		/**
		 * @param {Object} params.
		 * @param {*} params.disCode
		 * @param {*} params.indexFlag 1
		 * @param {*} params.page 1
		 * @param {*} params.rows 10
		 * @param {*} params.statRange 365
		 */
		getHotLoan: (params) => service.post('/find/index/getHotLoan', params),
		/**
		 * @param {Object} params.
		 * @param {*} params.docCode "1"
		 * @param {*} params.page 1
		 * @param {*} params.rows 6 
		 * @param {*} params.time "4"
		 */
		getNewBook: (params) => service.post('/find/index/getNewBook', params),

	},
	unify: {
		/**
		 * @param {Object} params.
		 * @param {*} params.isbn "978-7-5527-0074-9"
		 * @param {*} params.recordId 330957
		 * @param {*} params.title "天堂" 
		 */
		getPItemAndOnShelfCountAndDuxiuImageUrl: (params) => service.post(
			'/find/unify/getPItemAndOnShelfCountAndDuxiuImageUrl', params),

		/**
		 * {"docCode":[],"searchFieldContent":"*","searchField":"callNo","resourceType":[],"subject":[],"discode1":[],"publisher":[],"locationId":[],"collectionName":[],"author":[],"langCode":[],"countryCode":[],"coreInclude":[],"ddType":[],"verifyStatus":[],"group":[],"sortField":"relevance","sortClause":"desc","page":1,"rows":10,"onlyOnShelf":null,"categorySearchFlag":1,"campusId":[]}
		 * @param {Object} params.
		 * @param {Array} params.author
		 * @param {Array} params.campusId
		 * @param {Number} params.categorySearchFlag
		 * @param {Array} params.collectionName
		 * @param {Array} params.coreInclude
		 * @param {Array} params.countryCode
		 * @param {Array} params.ddType
		 * @param {Array} params.discode1
		 * @param {Array} params.docCode
		 * @param {Array} params.group
		 * @param {Array} params.langCode
		 * @param {Array} params.locationId 馆藏地Id
		 * @param {*} params.onlyOnShelf
		 * @param {Number} params.page 当前页 1
		 * @param {Array} params.publisher
		 * @param {Array} params.resourceType
		 * @param {Number} params.rows 每页显示数 10 默认30条，最大50条
		 * @param {String} params.searchField 检索字段
		 * @param {String} params.searchFieldContent 检索内容 *->代表所有
		 * @param {String} params.sortClause 排序 desc 降序，asc 升序
		 * @param {String} params.sortField 排序字段 创建时间create_date 相关度relevance 出版时间issued_sort  题名title_sort 责任者author_sort 索书号call_no_sort  分类号class_no_sort_s 出版社publisher_sort 标准号isbn_sort_s 元数据控制号record_id
		 * @param {Array} params.subject
		 * @param {Array} params.verifyStatus
		 */
		search: (params) => service.post('/find/unify/search', params),
		/**
		 * 相关推荐
		 * {"subject":[],"kindNo":[],"excludeField":"record_id","excludeFieldContent":"99954","sortField":"relevance","sortClause":"asc","page":1,"rows":10}
		 * @param {Object} params.
		 */
		searchForDetail: (params) => service.post('/find/unify/searchForDetail', params),
	},
	searchResultDetail: {
		/**
		 * @param {Object} params.
		 * @param {*} params.recordId 
		 */
		getDetail: (params) => service.get('/find/searchResultDetail/getDetail', params),
	},
	book: {
		/**
		 * @param {Object} params.
		 * @param {*} params.isbn "978-7-5527-0074-9"
		 * @param {*} params.recordId 330957
		 * @param {*} params.title "天堂" 
		 */
		getDuxiuImageUrl: (params) => service.get(
			'/find/book/getDuxiuImageUrl', params),
	},
	physical: {
		/**
		 * @param {Object} params.
		 * @param {*} params.page 1
		 * @param {*} params.rows 20
		 * @param {*} params.entrance null
		 * @param {*} params.recordId 
		 * @param {*} params.isUnify true
		 */
		groupitems: (params) => service.post('/find/physical/groupitems', params),
	},
	groupResource: {
		dic: () => service.get('/find/groupResource/dict')
	},
	category: {
		classifica: {
			/**
			 * {"classCode":"1","classLev":"1","parentClassNo":""}
			 */
			list: (params) => service.post('/find/category/classifica/list', params)
		}
	}
	// https://mfindjxkeda.libsp.cn/find/bookList/recordHotBookList
}